from main.exceptions.exception import NoIdealBlock

class FirstFit(object):

    def get_block(self, first_block, size):
        block = first_block
        while block:
            if(block.is_empty() and block.size >= size):
                return block
            block = block.next
        raise NoIdealBlock("There is no block for requested size")








